package stu.sup.service;

import com.github.pagehelper.PageHelper;
import org.apache.ibatis.annotations.Param;
import stu.sup.entity.Product;
import stu.sup.entity.ProductExample;

import java.util.List;

/**
 * Created by HUAWEI on 2020/6/21.
 */
public interface IProductService {

    /**
     * 增加商品
     * @param
     * @return
     */
    int insert(Product product);

    /**
     * 删除商品
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * 修改商品
     */
//    int updateByPrimaryKey(Product product);

    int updateByPrimaryKeySelective(Product product);

    /**
     * 分页查询商品
     */
    List<Product> selectByConditional(Product product,int pageNum,int pageSize);

    //根据商品的id查询该商品
    Product selectbyId(int productId);


}
